﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Tong;
public partial class aspnet_admin_bock_CX_Doctor_Del : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        TongUse TextData = new TongUse();
        int id = 0;
        string Tab="";
        try
        {
            id = int.Parse(Request.QueryString["id"].ToString().Trim());
            Tab = Request.QueryString["Tab"].ToString().Trim();
        }
        catch (Exception ex)//对错误码的处理
        {
            TextData.Err("此页面不能直接访问   <a href = " + Request.RawUrl.ToString() + ">" + ex.Message + " 返回</a>");
        }

        if (id != 0&&Tab!="")
        {

            TextData.SqlDataSave("delete   [" + Tab + "] where "+Tab+"_id =" + id);//删除记录
            TextData.Res.Response.Redirect("CX_Doctor_Show.aspx?Tab=" + Tab + IsShowElement());//转到请原始请示页

        }
        else
        {
            TextData.Err("   <a href = " + Request.RawUrl.ToString() + ">末知道错误 返回</a>");
        }






    }

    public String IsShowElement()
    {
        string scripttext = "";
        // Pic 显示小图片
        try
        {

            if (Convert.ToBoolean(Request.QueryString["Pic"].ToString()))
            {
                scripttext += "&Pic=true";
            }
            else
            {
                scripttext += "";
            }
        }
        catch
        {

        }

        // Cont 显示内容
        try
        {
            if (Convert.ToBoolean(Request.QueryString["Cont"].ToString()))
            {
                scripttext += "&Cont=true";
            }
            else
            {
                scripttext += "";
            }
        }
        catch
        {
            scripttext += "";
        }

        // Expiler 说明
        try
        {
            if (Convert.ToBoolean(Request.QueryString["Expiler"].ToString()))
            {
                scripttext += "&Expiler=true";
            }
            else
            {
                scripttext += "";
            }
        }
        catch
        {
            scripttext += "";
        }


        // Crtfile 生成文件名 
        try
        {
            if (Convert.ToBoolean(Request.QueryString["Crtfile"].ToString()))
            {
                scripttext += "&Crtfile=true";
            }
            else
            {
                scripttext += "";
            }
        }
        catch
        {
            scripttext += "";
        }

        // Sort 排序
        try
        {
            if (Convert.ToBoolean(Request.QueryString["Sort"].ToString()))
            {
                scripttext += "&Sort=true";
            }
            else
            {
                scripttext += "";
            }
        }
        catch
        {
            scripttext += "";
        }

        // ShowLx 科室 
        try
        {
            if (Convert.ToBoolean(Request.QueryString["ShowLx"].ToString()))
            {
                scripttext += "&ShowLx=true";
            }
            else
            {
                scripttext += "";
            }
        }
        catch
        {
            scripttext += "";
        }

        // linkxx 链接地址
        try
        {
            if (Convert.ToBoolean(Request.QueryString["linkxx"].ToString()))
            {
                scripttext += "&linkxx=true";
            }
            else
            {
                scripttext += "";
            }
        }
        catch
        {
            scripttext += "";
        }


        return scripttext;
    }
}
